package com.exsun.ex1077.ui.activity.msg

import androidx.databinding.ObservableField
import androidx.lifecycle.MutableLiveData
import com.exsun.ex1077.network.apiService
import com.exsun.ex1077.network.entity.Msg
import com.zhangping.fastjetpack.base.BaseViewModel
import com.zhangping.fastjetpack.extend.base.request

/**
 * 描述：
 * 作者：ZhangPing
 * 创建时间：2022/8/9 16:15
 */
class MsgDetailViewModel: BaseViewModel() {

    val model = ObservableField<Msg>()

    fun removeMsg(id: String): MutableLiveData<Boolean> {
        val liveData = MutableLiveData<Boolean>()
        request({ apiService.msgRemove(id)}, { liveData.value = true })
        return liveData
    }

}